<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'products-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'英文产品名称'); ?>
		<?php echo $form->textField($model,'ENName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ENName'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'中文产品名称'); ?>
		<?php echo $form->textField($model,'ZHName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ZHName'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'英文产品简述'); ?>
		<?php echo $form->textArea($model,'ENSummary',array('cols'=>30,'rows'=>2,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'ENSummary'); ?>
	</div>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'中文产品简述 '); ?>
		<?php echo $form->textArea($model,'ZHSummary',array('cols'=>30,'rows'=>2,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'ZHSummary'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'分类 　　'); ?>
		<?php echo $form->dropDownList($model,'CategoryId',$CareAry); ?>
	</div>		
	
	<div class="row">
		<?php echo $form->labelEx($model,'是否显示首页'); ?>
		<?php echo $form->dropDownList($model,'IndexFlag',$flagDatas); ?>
	</div>	
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'排序　　　'); ?>
		<?php echo $form->textField($model,'Sorts',array('size'=>20,'maxlength'=>40)); ?>
		<?php echo $form->error($model,'Sorts'); ?>
	</div>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'图片路径1'); ?>
		<?php echo $form->fileField($model,'Pic1',array('size'=>50)); ?>
		<?php echo $form->error($model,'Pic1'); ?>
	</div>
	<?php if(isset($model->Pic1) && !empty($model->Pic1)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->Pic1;?>" width="90" height="60"/></a>
		<a onclick="if(confirm('您确定要删除？')){return true;}else{return false;}" 
			href="<?php echo $this->createUrl("products/Delimg",array('ID'=>1,'return'=>$model->ID))?>">删除</a>
		<?php echo $form->hiddenField($model,'Pic1',array('size'=>50));?>
	</div>
	<?php }?>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'图片路径2'); ?>
		<?php echo $form->fileField($model,'Pic2',array('size'=>50)); ?>	
		<?php echo $form->error($model,'Pic2'); ?>
	</div>	
	<?php if(isset($model->Pic2) && !empty($model->Pic2)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->Pic2;?>" width="90" height="60"/></a>
		<a onclick="if(confirm('您确定要删除？')){return true;}else{return false;}" 
			href="<?php echo $this->createUrl("products/Delimg",array('ID'=>2,'return'=>$model->ID))?>">删除</a>		
		<?php echo $form->hiddenField($model,'Pic2',array('size'=>50));?>
	</div>
	<?php }?>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'图片路径3'); ?>
		<?php echo $form->fileField($model,'Pic3',array('size'=>50)); ?>
		<?php echo $form->error($model,'Pic3'); ?>
	</div>
	<?php if(isset($model->Pic3) && !empty($model->Pic3)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->Pic3;?>" width="90" height="60"/></a>
		<a href="<?php echo $this->createUrl("products/Delimg",array('ID'=>3,'return'=>$model->ID))?>">删除</a>
		<?php echo $form->hiddenField($model,'Pic3',array('size'=>50));?>
	</div>
	<?php }?>		
	
	<div class="row">
		<?php echo $form->labelEx($model,'图片路径4'); ?>
		<?php echo $form->fileField($model,'Pic4',array('size'=>50)); ?>
		<?php echo $form->error($model,'Pic4'); ?>
	</div>	
	<?php if(isset($model->Pic4) && !empty($model->Pic4)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->Pic4;?>" width="90" height="60"/></a>
		<a onclick="if(confirm('您确定要删除？')){return true;}else{return false;}" 
			href="<?php echo $this->createUrl("products/Delimg",array('ID'=>4,'return'=>$model->ID))?>">删除</a>		
		<?php echo $form->hiddenField($model,'Pic4',array('size'=>50));?>
	</div>
	<?php }?>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'图片路径5'); ?>
		<?php echo $form->fileField($model,'Pic5',array('size'=>50)); ?>
		<?php echo $form->error($model,'Pic5'); ?>
	</div>	
	<?php if(isset($model->Pic5) && !empty($model->Pic5)){?>
	<div class="row">
		<?php echo $form->labelEx($model,'上传图片'); ?>
		<a href="#"><img src="<?php echo $model->Pic5;?>" width="90" height="60"/></a>
		<a onclick="if(confirm('您确定要删除？')){return true;}else{return false;}" 
			href="<?php echo $this->createUrl("products/Delimg",array('ID'=>5,'return'=>$model->ID))?>">删除</a>		
		<?php echo $form->hiddenField($model,'Pic5',array('size'=>50));?>
	</div>
	<?php }?>			
	
	<div class="row">
		<?php echo $form->labelEx($model,'中文产品描述 '); ?>
		<?php $ZHContent=(isset($model->ENContent) && !empty($model->ENContent))?$model->ENContent:''?>
		<?php echo $this->htmlEdit('Products[ENContent]',$ZHContent ); ?>
		<?php echo $form->error($model,'ENContent'); ?>
	</div>	
	
	<div class="row">
		<?php echo $form->labelEx($model,'中文产品描述 '); ?>
		<?php $ZHContent=(isset($model->ZHContent) && !empty($model->ZHContent))?$model->ZHContent:''?>
		<?php echo $this->htmlEdit('Products[ZHContent]',$ZHContent ); ?>
		<?php echo $form->error($model,'ZHContent'); ?>
	</div>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Creat' : 'Save'); ?>
	</div>	
									

<?php $this->endWidget(); ?>

</div><!-- form -->